# -*- coding:utf-8 -*-
import messageDao

class messageLogic(object):
    def __init__(self, mysql_conn):
        self.__dao = messageDao.messageDao(mysql_conn)

    def get_count(self, recv_uid):
        ret = {}
        ret['retcode'] = 0
        ret['retbody'] = self.__dao.get_count(recv_uid, )
        return ret

    def get_list(self, recv_uid, pageno):
        ret = {}
        ret['retcode'] = 0
        ret['retbody'] = self.__dao.get_list(recv_uid, pageno,)
        return ret

    #def get_content(self, recv_uid, message_id):
    #    return self.__dao.get_content(recv_uid, message_id,)

    def remove(self, recv_uid, message_id):
        return self.__dao.remove(recv_uid, message_id,)

    def clear_unread_count(self, recv_uid):
        return self.__dao.clear_unread_count(recv_uid,)

    def send(self, message_item):
        return self.__dao.send(message_item)
